The present invention relates to an emulation technique for a rotating storage device, and more particularly, to a technique which can be effectively applied to an emulation of a magnetic disk unit handling a variable-length record.
There has been a remarkable improvement in the recording density of information recorded on a recording medium such as a magnetic disk device, which is a kind of a rotating storage device. A higher-performance product is being developed to replace the existing ones in a relatively short period of time. On the other hand, an electronic computer system using the magnetic disk devices as external storage devices faces both economic and time difficulties in immediately introducing the specification of a newly-developed magnetic disk device (hereinafter to be referred to as a new device) into the system for operation because the total system is of a large scale at high cost, and it takes a relatively long time to develop an operating system, which is the basic software for operating the system. Accordingly, it becomes necessary to eliminate these difficulties encountered during the period of a change of the system, by employing an emulation technique which makes a newly-introduced magnetic disk device to carry out an artificial operation which is equivalent to the operation of an original magnetic disk device currently used in the system, and it is also necessary to effectively utilize the physical high-performance property (data transfer speed) of the new device. In the case of emulating a complex recording format such as the one of the count key data system on a new device having different specifications with an increased track capacity by an improvement of the recording density, there is a problem that a record of the improved recording density which is written following the rotating reference position does not match in its record writing angle with the angle of the original disk format in the circumferential direction, or the sector positions do not coincide with each other, so that it becomes difficult to carry out normal recording and reproducing operations.
In order to solve the above problem, a technique is known which makes sector positions to coincide by extending a gap between one record and the next record, such as the technique of recording and reproducing a record by changing over between the native specifications and the emulation specifications, as disclosed in the U.S. Pat. No. 4,680,653 and JP-A-62-281167 corresponding thereto, for example.
The above-described prior-art technique is acceptable when there is sufficient room in the capacity of the track on a new device. However, it has the following problem when there is a limit to the track capacity.
When a record is written, the record writing position depends on the length of the track on which the preceding record has been written; in other words, the difference between an index of a reference point of the track and the end point of the preceding record position.
Therefore, the number of gaps increases when short records are written continuously by using an increased gap length of the native specifications in the new device.
Accordingly, there arises a problem that the number of records that can be written on one track in the original device cannot be accommodated within one track in the new device.
An example of the above-described problem of emulation in the original device and the new device having mutually different specifications will be explained in detail with reference to FIGS. 1A and 1B and FIGS. 2A to 2C. FIGS. 1A and 1B are conceptual diagrams to show a comparison in the two drawings between an example of the capacity of the track in the original device and an example of the capacity of the track in the new device. FIGS. 2A to 2C are conceptual diagrams showing one example each of setting a size of a record based on minimum segments for the record.
Track capacity will be explained first. The original device, for example, H-6586 of Hitachi, Ltd., has its one track divided into 222 sectors, each sector comprising seven segments.
One segment comprises 32 bytes. A gap G1 disposed between an index I and a home address field HA comprises 16 segments, a gap G2' between the home address field HA and a count field R0C of a header record R0 comprises eight segments, a gap G2 between a count field RnC and a data field RnD (n=0-93) of each record comprises seven segments, and a gap G3 between the header record R0 and a count field RlC of a next record Rl comprises eight segments including the corresponding count field RlC. A gap G4 disposed at the end of the track is provided to compensate for defects of the medium on the track, and three segments are allocated per one defect, the gap G4 comprising 21 segments to be able to compensate for a total of seven defects. As a result, one track has 1554 segments in total.
The new device, H-6587 of Hitachi, Ltd., for example, has its one track divided into 224 sectors, each sector comprising eight segments. One segment comprises 34 bytes. The gap G1 comprises 20 segments, the gap G2' comprises 10 segments, the gap G2 comprises 9 segments, the gap G3 comprises 10 segments including the count field RnC, and the gap G4 comprises 21 segments for a total of seven defects, three segments being allocated to one defect. One track has 1792 segments in total. The new device has a higher recording density than that of the original device.
Setting of a record size based on a segment will be explained below.
A minimum record having no key field K comprises a count field C of one segment and a data field D.
In the original device, 16 segments are necessary as minimum record segments (as shown in FIG. 2A) and 93 records can be accommodated in one track because record 0 is excluded from the user record.
On the other hand, 20 segments are necessary in the native (i.e., pre-emulation) mode of the new device (as shown in FIG. 2B) and 86 records can be accommodated in one track, thus generating a problem that seven records (93-86) cannot be accommodated.
In order to set the number of records per track in the new device to be equal to the number of records per track in the original device, it is considered appropriate to reduce the size of the gaps. However, gaps between records are provided to generate a command execution time of a host channel in a continuous record processing, and therefore, a mere reduction of the size of the gaps between the records generates another problem in that a command overrun may easily occur; that is, the execution of a command is not completed in time for the arrival of the next record, in a continuous record processing.
Each time a command overrun occurs, it becomes necessary to wait for a rotation, causing a substantial reduction in the data transfer quantity (throughput) per unit time between the magnetic disk device and the high-order channel.